/*
 * Copyright (c) 2012 Keerthi Ramachandran .
 */
package com.kee.example.domain;

/**
 * This class... todo (RK) javadoc
 *
 * @author <a href="mailto:Keerthi.Ramachandran@navis.com">Keerthi Ramachandran</a>, 8/16/12
 * @since 2.4. /2012-08-16
 */
public class Phone {
    private String areaCode;
    private String phoneNo;

    public Phone() {
    }

    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String inAreaCode) {
        areaCode = inAreaCode;
    }

    public String getPhoneNo() {
        return phoneNo;
    }

    public void setPhoneNo(String inPhoneNo) {
        phoneNo = inPhoneNo;
    }

    @Override
    public int hashCode() {
        return new org.apache.commons.lang.builder.HashCodeBuilder().append(this.areaCode).append(this.phoneNo).toHashCode();
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Phone other = (Phone) obj;
        return new org.apache.commons.lang.builder.EqualsBuilder().append(this.areaCode, other.areaCode).append(this.phoneNo, other.phoneNo)
                .isEquals();
    }

    @Override
    public String toString() {
        return "Phone Number    "+this.getAreaCode()+"-"+this.getPhoneNo();
    }
}
